package com.fhz.mvvmshopjava.ui.classify;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

import com.fhz.mvvmshopjava.api.ServiceApi;
import com.fhz.mvvmshopjava.core.BaseViewModel;
import com.fhz.mvvmshopjava.entity.Category;
import com.fhz.mvvmshopjava.utils.RetrofitManger;
import com.fhz.utilsfhz.ApiResponse;

import java.util.List;

import javax.inject.Inject;

import dagger.hilt.android.lifecycle.HiltViewModel;

@HiltViewModel
public class ClassifyViewModel extends BaseViewModel<ClassifyRepository> {

    @Inject
    public ClassifyViewModel(ClassifyRepository repository) {
        super(repository);
    }

    public LiveData<ApiResponse<List<Category>>> getCategory(String type){
        return repository.getCategory(type);
    }
}















